<?php
header("Content-type: text/html; charset=utf-8");
require_once 'common.inc.php';
!in_array('2', $larr) && adminmsg('你没有被赋予操作该项的权限！');
$table=$tablepre.$ostable;
$update="content='$content1'";
$webtb=$ostable;
$webtitle='日况';

if ('edit' == $action) {
	$action = 'oedit';
	$sql = "select * from $table where id='$id'";
	$query = $db-> query($sql);
	while ($resulte = $db-> fetch_array($query)) {
		$weblist = $resulte;
	} 
	include_once MCC_ROOT . "/templates/msystem/{$webtb}add.htm";
} elseif ('oedit' == $action) {
	$upsql=$update;
	$sql = "update $table set $upsql where id='$id'";
	$query = $db-> query($sql);
	adminmsg('修改成功', "$PHP_SELF?ostable=$ostable&action=edit&id=$id");
}
?>